import { AuthGuard, PermissionGuard } from '@abp/ng.core';
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { UserRoleComponent } from './user-role/user-role.component';
import { UserListComponent } from './user-list/user-list.component';
import { UserDetailComponent } from './user-detail/user-detail.component';

const routes: Routes = [
  {
    path: 'user-list',
    component: UserListComponent,
    canActivate: [AuthGuard, PermissionGuard],
  },
  {
    path: 'user-detail',
    component: UserDetailComponent,
    canActivate: [AuthGuard, PermissionGuard],
  },
  {
    path: 'roles',
    component: UserRoleComponent,
    canActivate: [AuthGuard, PermissionGuard],
  },
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule],
})
export class IdentityRoutingModule {}
